import { http } from "@/utils/http";
const apiRouter = `admin-staff`;

//修改
export const putV1OmsStaff = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=update`, { data });
};

//新增
export const postV1OmsStaff = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=create`, { data });
};

//分页列表
export const getV1OmsStaffPage = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=list`, { data });
};

//下拉框选择器
export const getV1OmsStaffSelector = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=selector`, { data });
};

//获取详情
export const getV1OmsStaffDetail = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=info`, { data });
};

//删除
export const deleteV1OmsStaffDetail = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=delete`, { data });
};
//修改密码
export const postV1OmsStaffModifyPassword = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=modifyPassword`, {
    data
  });
};
